The Content Rotator component automatically rotates HTML content strings on a Web page. Each time a user requests the Web page, the Content Rotator component displays a new HTML content string based upon information that you specify in a Content Schedule file.
Because the content strings can contain HTML tags, you can display any type of content that HTML can represent: text, images, or hyperlinks. For example, you can use this component to rotate through a list of daily quotations or hyperlinks, or to change text and background colors each time the Web page is opened.
Note This component is not officially supported by Microsoft®. Peer support is available on the Active Server Pages mailing list or on the microsoft.public.inetserver.iis.activeserverpages newsgroup.
To subscribe to the Active Server Pages mailing list, send mail to listserv@listserv.msn.com with
subscribe ActiveServerPages [firstname lastname]
in the body of the message, and then follow the directions. (firstname and lastname are optional.)
You can reach the newsgroup through msnews.microsoft.com and other NNTP servers.
The following files are used by the Content Rotator component:
FileNames | |
ContRot.dll | The Content Rotator component. |
Content Schedule File | A text file that contains the display schedule and file information for Web content. This file must be available on a Web server virtual path. |
<% Set oVar = Server.CreateObject("IISSample.ContentRotator") %>
None.
ChooseContent | Retrieves and displays a content string. |
GetAllContent | Retrieves and displays all the content strings in the Content Schedule file. |
Because the Content Rotator uses a random generator to select which of the weighted content strings is displayed, a string may be repeated. This is most likely to occur if there are few entries in the Content Schedule file, or if one entry is weighted much higher than the others.
<% Set Tip = Server.CreateObject("IISSample.ContentRotator") Tip.ChooseContent("/tips/tiprot.txt") %>